<template>
  <cv-filter
    :config="filterConfig"
    :data="filterData"
    @query="
      () => {
        emit('query', filterData)
      }
    "
    @reset="
      () => {
        emit('reset', filterData)
      }
    "
  ></cv-filter>
</template>

<script setup lang="ts">
import { ShopGoodsCategory } from '@/api/goods/admin-catrgory'
import { FilterConfig } from '@/packages/components'

const emit = defineEmits(['query', 'reset'])
const props = defineProps({
  /**
   * 筛选属性字段
   */
  filterData: {
    type: Object,
    default: () => {
      return {}
    },
  },
})
//const { } = toRefs(props);

const filterConfig = reactive<FilterConfig<ShopGoodsCategory>>({
  items: [
    {
      type: 'input',
      prop: 'categoryName',
      label: '分类名称',
    },
  ],
})
</script>
<style lang="scss" scoped></style>
